home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d3 / amac36.arc / SRCH24.QM < prev    next >
Text File  |  1991-03-16  |  55KB  |  1,147 lines

  1. *                               (SRCH24).QM
  2. *┌─────────────────[ (INDEX) Search/Replace Macros ]───────────────────────────┐
  3. *│
  4. *│@(4) - Srch/rplc from command line, quits each file after replacement,  <-new
  5. *│                                    loads files w/SRQ.BAT, no prompt
  6. *│@(0) - Srch/rplc from command line, loads files w/SR.BAT,  no prompt
  7. *│@(7) - Srch ONLY from command line, loads files w/SRL.BAT, no replace
  8. *│      >>>>>>> (Macros @0, @4 and @7 cannot be run while editing) <<<<<<<
  9. *│
  10. *│@(1)─┐ Makes FileList of files containing search text while editing
  11. *│@(2)─┤ Loads FileList of files containing search text while editing
  12. *│@(8)─┘ Srch/rplc while editing loaded files only, prompts,
  13. *│       saves ONLY & keeps loaded ONLY files w/replacements.
  14. *│@(5) - Srch/rplc while editing, finds/loads files, prompts
  15. *│@(9) - Srch ONLY loaded files, keep loaded ONLY files w/ found text
  16. *│
  17. *│^(f1_) Find multiple search text in current file, uses FGREP
  18. *│^(f2_) Find multiple search text in current file, uses Dos FIND
  19. *│^(f3_) View another occurence of search text in current file
  20. *│
  21. *│(F4) - RepeatFind
  22. *│(F5) - PrevFile
  23. *│(F6) - NextFile
  24. *│
  25. *│@(a)   Moves cursor to first word delimiter after wordleft
  26. *│@(f)   Moves cursor to first word delimiter after wordright
  27. *│^(a_)  Moves cursor to first character of wordleft
  28. *│^(f_)  Moves cursor to first character of wordright
  29. *│@(h) - Select Index item with cursor line, then <enter>.
  30. *│
  31. *│(CursorLeft)  Wrap cursor to previous line like Wordstar does
  32. *│(CursorRight) Wrap cursor to next       "    "     "       "
  33. *│             [These two macros were written by Tim Farley]
  34. *│
  35. *│(Index) Use      - How to locate macro or item below from Index using @h
  36. *│(Description)    - Search/Replace Macros
  37. *│(Startup)        - What's required
  38. *│(Macros)         - Search/Replace Macros
  39. *│(Other) Macros   - not included
  40. *│(Version) history
  41. *└────────[ be sure to leave at least one blank line at end of Index  ]────────┘
  42.  
  43.  
  44. *                Confirms  Saves    Must Be
  45. *                Replace-  Loaded   First                       Byte
  46. * Key Run While  ment?     Files?   Macro?      Comments        Size
  47. * ──  ─────────  ────────  ──────   ────── ───────────────────  ────
  48. * @4  cmnd line  no        yes/quit yes    s/r w/SRQ.bat        153 <-new
  49. * @0  cmnd line  no        yes      yes    s/r w/SR.bat         153
  50. * @7  cmnd line  n/a       n/a      yes    load only w/SRL.bat   83
  51. * @1─┐editing    n/a       n/a      no     makes FileList only   99
  52. * @2─┤editing    n/a       n/a      no     loads files only      19
  53. * @8─┘editing    yes       rpl only no     s/r loaded files      41
  54. * @5  editing    yes       rpl only no     s/r finds files      235
  55. * @9  editing    srch only no       no     s/o loaded files      40
  56. * ^F1 editing    srch only no       no     s/o current file      67
  57. * ^F2 editing    srch only no       no     s/o current file      65
  58. * ^F3 editing    n/a       no       no     view another occurnc. 27 
  59. * @h  editing    -         -        -      Help locate macros    47
  60.  
  61. * (Index) Use;
  62. *
  63. * To locate a macro or item in this file, press @h, place the cursor
  64. * line on the desired item in the Index above, and press <enter>.
  65. * See BOOK15.QM for more details.
  66.  
  67.  
  68. * (Description):
  69. *
  70. * (SRCH24) are QEdit macros to search/replace only files containing
  71. * search text from a FileList of file search patterns. Only files
  72. * containing the search text are loaded automatically, and then the
  73. * desired search/replace is performed. Search/replace may also be run
  74. * from the command line and while editing files.
  75.  
  76. * To BEGIN, just type "START SRCH" <Enter>. All pertinent files will be
  77. * loaded in the "Ring" for viewing, and SRCH24.MAC is read.
  78. * Alternatively, type "START SRCH 0" <Enter> and the disk copies of all
  79. * files in the "Ring" will be loaded ready for editing, saving time.
  80.  
  81. * (Startup):
  82. *
  83. * In order for the search/replace macros to run, first  make a
  84. * FileList, SRCH-FG.LST, of the file patterns to be searched.
  85. * Here's mine:
  86.  
  87. *         *.qm
  88. *         *.ql
  89. *         *.inf
  90. *         *.bat
  91. *         *.lst
  92. *         *.me
  93. *         *.doc
  94. *         *.syn
  95. *         e:\syn\sa.syn
  96. *         u:\sr?.bat
  97.  
  98.  
  99. * The SA.SYN entry is my PCED synonym file.
  100.  
  101. * You may want to consider putting only one single file name in the list
  102. * to try these macros, eg TEST.QM.
  103.  
  104. * To perform a search/replace from the command line, type SR, and
  105. * answer the prompts for search and replace text. To perform a SEARCH
  106. * ONLY from the command line, type SRL, and answer the prompts for
  107. * search text. All searches with these macros and batch files are
  108. * non-case sensitive. To perform a case sensitive search, change "GIN"
  109. * to "GN"in the macros below and "-f" to "-fc" in the batch files.
  110.  
  111. * Chris Dunford's excellent FGREP and William Parke's INPUT.COM must be
  112. * located in the path. FGREP can be found on CompuServe IBMAPP Lib 1 as
  113. * FGREP.ARC, v1.71, and on Exec-PC as FGREP172.ZIP. INPUT can be found
  114. * on Exec-PC as INPUT.ZIP. They are probably on many other BBS's also.
  115.  
  116. * When using SR.BAT or SRL.BAT, the message "0 Files copied" means no
  117. * files were found containing the search text, and the macro stops with
  118. * the file c:! loaded but it contains no output from FGREP.
  119.  
  120. * Search and replacement text may be single or multiple words only
  121. * when answering search and replacement prompts, not from the command
  122. * line.
  123. *
  124. * Replacing C: with your ram disk will make the macros run faster.
  125.  
  126. * Alt_0/7 set and use the Dos environment variables FGS and FGR. The
  127. * letters "FGS" and "FGR" must NOT occur in any other Dos environment
  128. * variable name or value. You must have enough environment space to
  129. * store both the search and replacement text.
  130.  
  131. * QEdit must be named Q.EXE.
  132.  
  133. * Insert should be ON.
  134.  
  135. * For (other) macros, see ALLMACRO.INF.
  136.  
  137. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  138.  
  139. * (qQq www for search/replace test)
  140.  
  141. * (Macros):--------------------------------------------------------
  142. *
  143. *┌─────────────────────────────────────────────────────────────────────┐
  144. *│ @(0) Macro for search/replace from command line with SR.BAT         │
  145. *└─────────────────────────────────────────────────────────────────────┘
  146. *  ******** MUST BE FIRST MACRO IN FILE FOR START UP IN SR.BAT*********
  147. *            ****** MUST RUN SR.BAT TO USE THIS MACRO******
  148. *
  149. * To do a search/replace from command line, just type SR, and answer
  150. * prompts for search and replacement text.
  151. *
  152. * TEST.QM is included to show how this macro works. Type/enter at the
  153. * command line as follows:
  154. *
  155. *  1.   "SR"  <enter>
  156. *  2.   "aaa" space "bbb" <enter>   (answer SEARCH text prompt)
  157. *  3.   "aaa" space "BBB" <enter>   (answer REPLACEMENT text prompt)
  158. *  4.   "GIN" <enter>               (answer REPLACEMENT option prompt)
  159.  
  160. * This version of @0 also uses the "Once-Around the ring" technique of
  161. * Kyle Watkins. This macro is smaller and faster than Version 1.8 and
  162. * prior because files are loaded by NextFile rather than EditFile, and
  163. * SET >c:$ is moved to the SR.BAT batch file from the macro.
  164.  
  165. * When finished running with the batch file or PCED, the following
  166. * files are loaded for viewing or editing:
  167. *
  168. * Window 1       -nul file
  169. * Window 2...n+1 -files containing search text, n = (# files found)
  170. *
  171. * IT CANNOT BE RUN WHILE EDITING!
  172. *
  173. * Temporary file names are:
  174. *
  175. * c:$.ql  List of files found & search text (output from FGREP)
  176. * c:!     Same as c:$.ql
  177. * c:$     Output of Dos SET.
  178. * _       NUL file (NUL file is also ! in some other macros)
  179.  
  180. * When using SR.BAT or SRL.BAT, the message "0 Files copied" means no
  181. * files were found containing the search text, and the macro stops with
  182. * the file c:! loaded but it contains no output from FGREP.
  183. *
  184. @0      MacroBegin
  185. ***************************************** LOAD FILES
  186.         altwordset                      * For all file names
  187.         endfile                         * Get to end of file
  188.  LOADAGAIN:                             *
  189.         unmarkblock                     * Unmark last file name
  190.         find #42 "Fi" return "B"  return* Find file name
  191.  jfalse  END:                           * No find ? quit
  192.         wordright                       * Move to space
  193.         wordright                       * Move to file name
  194.         markcolumn                      * Mark it
  195.         endline                         * Get all name in block
  196.         copy                            * Copy file name to scrap
  197.         EditFile                        * Get ready to load
  198.         CurrentFilename " "             * To force return *here*
  199.         Paste Return                    * Paste file name & do it!
  200.         cursorup                        * Go to next line
  201.  jfalse ENDLOAD:                        * No more filenames? Done load
  202.  jump LOADAGAIN:                        * Check again
  203.  ENDLOAD:                               *
  204.         quit                            * Quit c:! from ring so no rplc
  205. ***************************************** GET SEARCH TEXT TO SCRATCH
  206.         editfile "c:$" return           * Load set output file
  207.         find  "FGS" return return       * Find FGS
  208.         wordright                       * Get to SEARCH text
  209.         markcolumn                      * Begin mark
  210.         endline                         * Mark SEARCH text
  211.         cursorleft                      * No trailing space in block
  212.         storescrbuff "FGS" return       * Store SEARCH text to scratch
  213. ***************************************** GET REPLACE TEXT TO SCRATCH
  214.         unmarkblock                     * Get ready
  215.         begfile                         * Get to top
  216.         find  "FGR" return return       * Find FGR
  217.         wordright                       * Get to REPLACE text
  218.         markcolumn                      * Begin mark
  219.         endline                         * Mark it all
  220.         cursorleft                      * No trailing space in block
  221.         storescrbuff "FGR" return       * Store REPLACE text to scratch
  222.         killfile                        * Kill c:$ for next time
  223.         quit                            * Remove c:$ from ring
  224. ***************************************** BEGIN SEARCH/REPLACE
  225.         Editfile "_" Return             * Insert -or- GoTo NUL File
  226.         getscrbuff "FGS" return cut     * Cut search text from scratch
  227.         Find paste Return escape        * Initialize find prompt
  228.         getscrbuff "FGR" return cut     * Cut replace text from scratch
  229.         FindReplace return              * Begin replacement
  230.         paste return                    * paste REPLACEMENT text
  231. **         "GIN" Return                    ** Replace, no prompt
  232.         Pause Return                    * Allow user input of Options
  233.         Begline Cursorright      * Put cursor in Col. 2 of NUL File
  234.         LOOP:                    * Main test loop
  235.             Nextfile             * Move to next files in Ring
  236.             Cursorleft           * Move cursor left (need for NUL test)
  237.             Jfalse DOIT:         * If couldn't move to left, it's not
  238.                                  * the NUL File AND cursor position
  239.                                  * has not changed -- GO with the
  240.                                  * FindReplace
  241.                                  *ELSE
  242.                                  * Check to see if in the NUL File
  243.             Cursorleft           * Move cursor left for NUL Test
  244.             Jfalse ENDLOOP:      * If couldn't move left -- We
  245.                                  * ARE in the NUL File and Need
  246.                                  * to ENDLOOP
  247.                                  *ELSE
  248.             Cursorright          * Move back to Col. 2 in NUL File
  249.         DOIT:                    * FindReplace Loop
  250.             BegFile              * Move up in case cursor is below find
  251.             Repeatfind           * Do the FindReplace
  252.             Jtrue SAVE:          * If CHANGES are made -- SAVE the File
  253.             Quit                 * If NO CHANGES are made -- QUIT the
  254.                                  * File
  255.             Jump LOOP:           * Return to the Main Loop
  256.         SAVE:                    * Routine to Save a File with Changes
  257.             Savefile             * Save the file
  258.             Jump LOOP:           * Return to Main Loop
  259.         ENDLOOP:                 * Loop is DONE
  260.             Quit                 * Quit the NUL File
  261.   END:                           *
  262.         defaultwordset           * set default
  263. *
  264. * 191 bytes Sun  09-16-1990  15:09:40
  265. * 153 bytes Tue  10-02-1990  18:50:33
  266.  
  267.  
  268.  
  269.  
  270.  
  271. *┌─────────────────────────────────────────────────────────┐
  272. *│ @(1) - makes FileList of files containing search text   │
  273. *└─────────────────────────────────────────────────────────┘
  274. @1      MacroBegin
  275.         Dos 'FGREP -f0 /'               * Make FileList        |v2.2
  276.         Pause                           *
  277.         '/>c:! @SRCH-FG.lst'            *                      |v2.2
  278.         return return                   *
  279.         editfile "c:!" return quit      * Edit FileList
  280.         editfile return                 *
  281.         begfile                         *
  282.         MarkColumn                      * Mark begfile c:!
  283.         endfile begline                 * Mark endfile col 1
  284.         wordright wordright             * Get to file name
  285.         cursorleft                      * Move off file name
  286.         DeleteBlock                     * Delete file name
  287.         SaveFile                        * Save FileList
  288.         begfile                         * Get to begin
  289.         MarkColumn                      * Mark begfile c:!
  290.         EndFile                         * Get to end
  291.         gotocolumn "12" return          * Get all file names in block
  292.         Sort                            * Sort FileList
  293.         killfile                        * Kill c:!
  294.         begfile                         * See FileList
  295.         unmarkblock                     * Without block mark
  296. *
  297. * 99 bytes Thu  09-13-1990  16:30:45
  298. * 99 bytes Sat  02-16-1991  15:40:01
  299.  
  300.  
  301.  
  302. *┌──────────────────────────────────────────────────────────────┐
  303. *│ @(2) - loads FileList of files containing search text        │
  304. *└──────────────────────────────────────────────────────────────┘
  305. * Written by Kyle Watkins, SemWare.
  306. *
  307. @2      MacroBegin
  308. ***************************************** LOAD FileList (from QLSTxx)
  309.         EndFile BegLine                 * Start at last line
  310.  REPEAT:
  311.         UnmarkBlock MarkLine Copy       * Grab this name
  312.         EditFile                        * Get ready to load
  313.         CurrentFilename " "             * To force return *here*
  314.         Paste Return                    * Paste file name & do it!
  315.         CursorUp                        * More lines above?
  316.         JTrue REPEAT:                   * If yes, repeat.
  317. *
  318. * 19 bytes Mon  09-03-1990  00:56:04
  319.  
  320.  
  321.  
  322.  
  323. * --------------------------------------------------------------------
  324. * @(4) Search/replace from command line, quit each file after rplcmnt.
  325. * --------------------------------------------------------------------
  326. *
  327. * Often the total size of files needing a "replacement" will exceed the
  328. * available memory when using SR.BAT and the startup macro @0. Macro @4
  329. * in SRCH_Q.QM is simply a modification of @0 by replacing savefile with
  330. * file, so each file is quit after replacement. See SRCH_Q.QM for this
  331. * macro.
  332. *
  333. * This macro must be the first macro in the file because it is used as
  334. * the startup macro with SRQ.BAT. IT CANNOT BE RUN WHILE EDITING!
  335.  
  336.  
  337.  
  338.  
  339.  
  340. *┌───────────────────────────────────────────────────────────────────┐
  341. *│ @(5) Makes and loads FileList of files containing search text,    │
  342. *│      then search/replace loaded files while editing               │
  343. *└───────────────────────────────────────────────────────────────────┘
  344. *
  345. @5     MacroBegin
  346. ***************************************** GET SEARCH TEXT
  347.         unmarkblock                     *
  348.         Editfile '!' Return             * Insert -or- GoTo NUL File
  349.        "Search Text=" markcolumn pause  * Search text?
  350.         storescrbuff "1" return copy    * Copy search text to scrap
  351. ***************************************** GET REPLACE TEXT
  352.         RETURN                          * Move to next line
  353.        "Replace Text=" markcolumn pause * Replacement text?
  354.         storescrbuff "2" return         * Store replacement to scratch
  355.         quit                            * Quit NUL
  356. ***************************************** MAKE FileList
  357.         DOS 'FGREP -f0 /'               * Make FileList        |v2.2
  358.         paste                           * Paste search text
  359.         '/>c:! @SRCH-FG.lst'            *                      |v2.2
  360.         return return                   *
  361.         editfile "c:!" return quit      * Edit FileList
  362.         editfile return                 *
  363.         begfile MarkColumn              * Mark begfile c:!
  364.         endfile begline                 * Mark endfile col 1
  365.  jfalse END:                            * End if no search text found
  366.         wordright wordright             * Get to file name
  367.         cursorleft                      * Move off file name
  368.         DeleteBlock                     * Delete file name
  369.         begfile                         * Get to begin
  370.         MarkColumn                      * Mark begfile c:!
  371.         EndFile                         * Get to end
  372.         gotocolumn "12" return          * Get all file names in block
  373.         Sort                            * Sort FileList
  374. ***************************************** LOAD FileList (from QLSTxx)
  375.         EndFile BegLine                 * Start at last line
  376.  REPEAT:
  377.         UnmarkBlock MarkLine Copy       * Grab this name
  378.         EditFile                        * Get ready to load
  379.         CurrentFilename " "             * To force return *here*
  380.         Paste Return                    * Paste file name & do it!
  381.         CursorUp                        * More lines above?
  382.         JTrue REPEAT:                   * Yes ? repeat
  383.         killfile                        * Kill c:!
  384.         quit                            * Quit c:!
  385.         Editfile '!' Return             * Insert -or- GoTo NUL File
  386.         getscrbuff "1" return cut       * Cut search text from scratch
  387.         Find paste Return escape        * Initialize find prompt
  388.         getscrbuff "2" return cut       * Cut replace text from scratch
  389.         FindReplace return              * Begin replacement
  390.         paste RETURN                    * paste REPLACEMENT text
  391. **         "GIN" Return                    ** Replace, no prompt
  392.         Pause Return                    * Allow user input of Options
  393.         Begline Cursorright      * Put cursor in Col. 2 of NUL File
  394.         LOOP:                    * Main test loop
  395.             Nextfile             * Move to next files in Ring
  396.             Cursorleft           * Move cursor left (need for NUL test)
  397.             Jfalse DOIT:         * If couldn't move to left, it's not
  398.                                  * the NUL File AND cursor position
  399.                                  * has not changed -- GO with the
  400.                                  * FindReplace
  401.                                  *ELSE
  402.                                  * Check to see if in the NUL File
  403.             Cursorleft           * Move cursor left for NUL Test
  404.             Jfalse END:          * If couldn't move left -- We
  405.                                  * ARE in the NUL File and Need
  406.                                  * to END the Macro
  407.                                  *ELSE
  408.             Cursorright          * Move back to Col. 2 in NUL File
  409.         DOIT:                    * FindReplace Loop
  410.             BegFile              * In case cursor is below find
  411.             Repeatfind           * Do the FindReplace
  412.             Jtrue SAVE:          * If CHANGES are made, SAVE the File
  413.             Quit                 * If NO CHANGES are made, QUIT the File
  414.             Jump LOOP:           * Return to the Main Loop
  415.         SAVE:                    * Routine to Save a File with Changes
  416.             Savefile             * Save the file
  417.             Jump LOOP:           * Return to Main Loop
  418.         END:                     * Macro is DONE
  419.             Quit                 * Quit the NUL File
  420. *
  421. * 260 bytes Sun  09-16-1990  14:48:58
  422. * 235 bytes Tue  10-02-1990  23:05:35
  423. * 235 bytes Sat  02-16-1991  15:40:17
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430. * ┌──────────────────────────────────────────────────────────────────┐
  431. * │ @(7) -Start up macro, loads only found files, no replacement     │
  432. * └──────────────────────────────────────────────────────────────────┘
  433. * *** IF USED, MUST BE FIRST MACRO FOR START UP WITH SRL.BAT or PCED***
  434. * ****** MUST RUN SRL.BAT OR PCED TO USE THIS MACRO******
  435.  
  436.  
  437. * To run, type SRL at the command line and answer prompt for search
  438. * text. After the files containing the search text are loaded, press  |
  439. * F4 to highlight first occurence of search text. Press F6 then F4 to |v2.2
  440. * highlight first occurence of search text in first file containing   |
  441. * search text. IT CANNOT BE RUN WHILE EDITING!                        |
  442. *
  443. *
  444. * SRL.BAT will accept SRL [search text] as long as [search text] is a
  445. * SINGLE word. This bypasses the need to respond to the INPUT prompt
  446. * for Search Text=. (added in v1.4)
  447. *
  448. * An alternative to using the batch file SRL.BAT is to use the
  449. * following PCED synonym instead:
  450. *
  451. * SYN     SRLFG 'echo off^break on^FGREP -f "&A" @SRCH-FG.LST >c:!
  452. *                ^Q. c:! /Esrl.mac /LSRCH24.mac^break off^echo on'
  453. *
  454. * Just add this synonym to the bottom of your synonym file on one line,
  455. * or type CED SYN SRLFG 'echo ...............'.
  456. *
  457. * To run using PCED, type SRLFG [search text] at the command line.
  458. *
  459. * When finished running with the batch file or PCED, the following
  460. * files are loaded for viewing or editing:
  461. *
  462. * Window 1       -list of files found & search text (output from FGREP)
  463. * Window 2...n+1 -files containing search text, n = (# files found)
  464. *
  465. *
  466. * Temporary file names are:
  467. *
  468. * c:$.ql  List of files found & search text (output from FGREP)
  469. * c:!     Same as c:$.ql
  470. * c:$     Output of Dos SET
  471. *
  472. * When using SR.BAT or SRL.BAT, the message "(0) Files copied" means no
  473. * files were found containing the search text, and the macro stops with
  474. * the file c:! loaded but it contains no output from FGREP.
  475. *
  476. @7 macrobegin
  477. ***************************************** LOAD FOUND FILES
  478.         altwordset                      * For all file names
  479.         endfile                         * Get to end of file
  480.  CHECKAGAIN:                            *
  481.         unmarkblock                     * CLEAR 112 last file name
  482.         find #42 "Fi" return "B"  return* Find file name
  483.         wordright                       * Move to space
  484.         wordright                       * Move to file name
  485.         markcolumn                      * Mark it
  486.         endline                         * Get all name in block
  487.         copy                            * Copy file name to scrap
  488.         EditFile                        * Get ready to load
  489.         CurrentFilename " "             * To force return *here*
  490.         Paste Return                    * Paste file name & do it!
  491.         cursorup                        * Go to next line
  492.  jfalse END:                            * No more file names? End
  493.  jump CHECKAGAIN:                       * Check again
  494.  END:                                   *
  495.         defaultwordset                  * Set default
  496. ***************************************** INITIALIZE FIND FOR SEARCH  |
  497.         DOS "set>c:$" return return     * Get SET output to tempfile  |
  498.         editfile "c:$" return           * Load tempfile               |
  499.         find  "FGS" return return      ** Find FGS in SET output      | v2.2
  500.         begline wordright dropanchor    * Mark first letter of search |
  501.                                         *  text                       |
  502.         endline cursorleft copy         * Copy search text to scrap   |
  503.         killfile quit                   * Kill/quit temp for next time|
  504.         Find paste return Escape        * Initialize find for F4      |
  505. *
  506. * 37 bytes Thu  09-06-1990  13:53:04
  507. * 83 bytes Sat  02-09-1991  10:47:23
  508.  
  509.  
  510.  
  511.  
  512. * ------------------------------------------------------------------------
  513. * @(8)  MACRO TO EXECUTE THE FindReplace ACROSS THE ENTIRE RING OF FILES
  514. *     ----------------------------------------------------------------
  515. *
  516. * See Kyle Watkin's alternate version below for more discussion.
  517.  
  518. @8      Macrobegin
  519.         Editfile '!' Return      * Insert -or- GoTo NUL File
  520.         Findreplace Pause Return * Allow user input of Find Item
  521.         Pause Return             * Allow user input of Replace Item
  522.         Pause Return             * Allow user input of Options
  523.         Begline Cursorright      * Put cursor in Col. 2 of NUL File
  524.         LOOP:                    * Main test loop
  525.             Nextfile             * Move to next files in Ring
  526.             Cursorleft           * Move cursor left (need for NUL test)
  527.             Jfalse DOIT:         * If couldn't move to left, it's not
  528.                                  * the NUL File AND cursor position
  529.                                  * has not changed -- GO with the
  530.                                  * FindReplace
  531.                                  *ELSE
  532.                                  * Check to see if in the NUL File
  533.             Cursorleft           * Move cursor left for NUL Test
  534.             Jfalse END:          * If couldn't move left -- We
  535.                                  * ARE in the NUL File and Need
  536.                                  * to END the Macro
  537.                                  *ELSE
  538.             Cursorright          * Move back to Col. 2 in NUL File
  539.         DOIT:                    * FindReplace Loop
  540.             Begfile              * Needed in case cursor is below Find
  541.             Repeatfind           * Do the FindReplace
  542.             Jtrue SAVE:          * If CHANGES are made -- SAVE the File
  543.             Quit                 * If NO CHANGES made  -- QUIT the File
  544.             Jump LOOP:           * Return to the Main Loop
  545.         SAVE:                    * Routine to Save a File with Changes
  546.             Savefile             * Save the file with CHANGES
  547.             Jump LOOP:           * Return to Main Loop
  548.         END:                     * Macro is DONE
  549.             Quit                 * Quit the NUL File
  550. *
  551. * 62 bytes Sat  09-15-1990  11:17:57 (K. Watkins version)
  552. * 41 bytes Sun  09-30-1990  20:32:55 (this version)
  553.  
  554.  
  555. * * ┌────────────────────────────────────────────────────────────────────┐
  556. * * │@(8)  MACRO TO EXECUTE THE FindReplace ACROSS ENTIRE RING OF FILES  │
  557. * * └────────────────────────────────────────────────────────────────────┘
  558. * *
  559. * * The following macro was written by Kyle Watkins of SemWare in
  560. * * response to my request for a macro to search/replace all loaded
  561. * * files, but also:
  562. * *         - save to disk only those files that had a replacement, and
  563. * *         - keep loaded  only those files that had a replacement made.
  564. * * It is an excellent and creative macro which I urge you to study
  565. * * because of the unique and powerful use of a NUL file as a
  566. * * place-marker.
  567. *
  568. * * ==============================================================================
  569. * * Date: 09-14-90 (11:49)           Number: 9940         SemWare Support BBS
  570. * *   To: TOM HOGSHEAD               Refer#: NONE
  571. * * From: KYLE WATKINS                 Read: NO
  572. * * Subj: ONCE AROUND THE FILE-RING    Conf: (0) Main Board
  573. * * ------------------------------------------------------------------------
  574. * * TH>I have been trying for several months to either modify the following
  575. * * TH>macro or come up with another way to search & replace all loaded
  576. * * TH>files but also to:
  577. * * TH>
  578. * * TH>        - save to disk only those files that had a replacement, and
  579. * * TH>        - keep loaded  only those files that had a replacement made.
  580. * *
  581. * * Hi Tom,
  582. * *     You may need to adjust this macro at the point where I quit the file
  583. * * if no replacements were made to it (The macro can be adjusted to save
  584. * * those files, if there were some pre-existing changes that were present
  585. * * before the macro was envolked). I wasn't sure what you wanted (my own
  586. * * preference is to retain other changes that I made before I envolked this
  587. * * macro -- BUT I wrote the macro to just Quit those files, since that is
  588. * * what I am guessing you want).
  589. * *     Basically, the macro will use the NUL file as a placeholder in the
  590. * * Ring-of-Files. With cursor manipulation, I will determine when you
  591. * * arrive at the NUL file again. Once you get back to the NUL file, the
  592. * * macro will end. Your starting point for the FindReplace throughout the
  593. * * entire Ring will be at the file immediately after the NUL file -- So if
  594. * * you do not have a NUL file already loaded, the starting point will be at
  595. * * the next file from the one that you are currently in. Otherwise, the
  596. * * starting point will be at the next file from the present location of the
  597. * * NUL file.
  598. * *     Note that I always return to the original cursor position, before
  599. * * the FindReplace is executed (allowing you to select any Option for the
  600. * * FindReplace routine).
  601. * *
  602. *
  603. * * ------------------------------------------------------------------------
  604. * *     MACRO TO EXECUTE THE FindReplace ACROSS THE ENTIRE RING OF FILES
  605. * *     ----------------------------------------------------------------
  606. * *
  607. * @8      Macrobegin
  608. *         Editfile 'NUL' Return    * Insert -or- GoTo NUL File
  609. *         Findreplace Pause Return * Allow user input of Find Item
  610. *         Pause Return             * Allow user input of Replace Item
  611. *         Pause Return             * Allow user input of Options
  612. *         Begline Cursorright      * Put cursor in Col. 2 of NUL File
  613. *                                  *
  614. *         LOOP:                    * Main test loop
  615. *                                  *
  616. *             Nextfile             * Move to next files in Ring
  617. *             Cursorleft           * Move cursor left (need for NUL test)
  618. *             Jfalse DOIT:         * If couldn't move to left, it's not
  619. *                                  * the NUL File AND cursor position
  620. *                                  * has not changed -- GO with the
  621. *                                  * FindReplace
  622. *                                  *
  623. *                                  *ELSE
  624. *                                  * Check to see if in the NUL File
  625. *                                  *
  626. *             Editfile
  627. *             'NUL ' Currentfilename Return * GoTo NUL File -- AND--
  628. *                                           * Preload File to Edit
  629. *                                           * Buffer so can Return
  630. *                                           * to Current File
  631. *                                  *
  632. *             Cursorleft           * Move cursor left for NUL Test
  633. *             Jfalse END:          * If couldn't move left -- We
  634. *                                  * ARE in the NUL File and Need
  635. *                                  * to END the Macro
  636. *                                  *
  637. *                                  *ELSE
  638. *             Cursorright          * Move back to Col. 2 in NUL File
  639. *                                  *
  640. *             Editfile
  641. *             Begline Delch Delch Delch Return  * Bring up EditFile Prompt
  642. *                                               * and delete NUL and
  643. *                                               * Return to File we left
  644. *                                  *
  645. *             Cursorright          * Restore Cursor to its previous
  646. *                                  * position and GO with the FindReplace
  647. *                                  *
  648. *         DOIT:                    * FindReplace Loop
  649. *                                  *
  650. *             Repeatfind           * Do the FindReplace
  651. *             Jtrue SAVE:          * If CHANGES are made -- SAVE the File
  652. *                                  *
  653. *             Quit                 * If NO CHANGES are made -- QUIT the
  654. *                                  * File
  655. *                                  *
  656. *             Jump LOOP:           * Return to the Main Loop
  657. *                                  *
  658. *                                  *
  659. *         SAVE:                    * Routine to Save a File with Changes
  660. *                                  *
  661. *             Savefile             * Save the file
  662. *             Jump LOOP:           * Return to Main Loop
  663. *                                  *
  664. *         END:                     * Macro is DONE
  665. *                                  *
  666. *             Quit                 * Quit the NUL File
  667. * *
  668. * * 62 bytes Sat  09-15-1990  11:17:57 (added TH)
  669. *
  670. *
  671. * *      ----------------------------------------------------------------
  672. * *     I hope this is what you need Tom. Feel free to optimize and alter
  673. * * the macro. The main Body of this macro can be used to allow any kind of
  674. * * ONE-TIME File Ring Sweep. I have already used the main body of the macro
  675. * * (with the neccessary adjustments) to Load all files that DO NOT cause a
  676. * * PRESS ESCAPE message -- So I hope it proves useful to you.
  677. * *
  678. * *                              --... ...--
  679. * * .......Kyle Watkins (SemWare Technical Support)
  680.  
  681.  
  682.  
  683.  
  684. * ┌────────────────────────────────────────────────────────┐
  685. * │@(9) Keep loaded only files with "found" text.          │
  686. * └────────────────────────────────────────────────────────┘
  687. *
  688. * This macro uses the same technique developed by Kyle Watkins in @8,
  689. * to keep loaded ONLY files with "found" text. No replacement or save
  690. * is made (@8 makes replacement and saves files with replacements, but
  691. * files without any replacement are QUIT from ring).
  692. *
  693. * Version 1.6 of this macro used RepeatFind in the DOIT loop. If that
  694. * version was executed more than once and the cursor was on the last
  695. * occurence of the search text in a file, RepeatFind would NOT find the
  696. * search text again, and the file was QUIT from the ring. Apparently
  697. * RepeatFind does NOT remember the "G" option with Find.
  698. *
  699. * This version replaces RepeatFind with Find "G". Now, if @9 is executed
  700. * more than once, any file with any occurence of the search text is
  701. * correctly kept loaded.
  702. *
  703. @9      Macrobegin
  704.         Editfile '!' Return      * Insert -or- GoTo NUL File
  705.         Find Pause Return "G"    * Allow user input of Find Item
  706.         Pause Return             * Allow user input of Options
  707.         Begline Cursorright      * Put cursor in Col. 2 of NUL File
  708.         LOOP:                    * Main test loop
  709.             Nextfile             * Move to next files in Ring
  710.             Cursorleft           * Move cursor left (need for NUL test)
  711.             Jfalse DOIT:         * If couldn't move to left, it's not
  712.                                  * the NUL File AND cursor position
  713.                                  * has not changed -- GO with the
  714.                                  * FindReplace
  715.                                  *ELSE
  716.                                  * Check to see if in the NUL File
  717.             Cursorleft           * Move cursor left for NUL Test
  718.             Jfalse END:          * If couldn't move left -- We
  719.                                  * ARE in the NUL File and Need
  720.                                  * to END the Macro
  721.                                  *ELSE
  722.             Cursorright          * Move back to Col. 2 in NUL File
  723.         DOIT:                    * Find Loop
  724.             Find Return "G" return * Do the Find
  725.             Jtrue LOOP:          * If FOUND   -- Return to Main Loop
  726.             Quit                 * If NO FIND -- QUIT the file
  727.             Jump LOOP:           * Return to the Main Loop
  728.         END:                     * Macro is DONE
  729.             Quit                 * Quit the NUL File
  730. *
  731. * 40 bytes Sun  09-30-1990  22:48:24
  732.  
  733.  
  734.  
  735.  
  736. * ^f1 and ^f2 macros are modifcations to macros written by Tim Farley
  737. * in BIGFIND.QM dated 8/21/89 and revised 9/6/89.
  738. *
  739. *------------------------------------------------------------
  740. * ^(f1_) Find multiple search text in current file, uses FGREP
  741. *------------------------------------------------------------
  742. *
  743. * Find all instances of a given string in current file, let the user
  744. * select one, hit return, and view line containing search string.
  745. * Change "c:" to ramdrive for faster operation.
  746. *
  747. * Uses Chris Dunford's excellent FGREP. Remember search string is
  748. * NOT case sensitive.
  749. *
  750. ^f1     MacroBegin                      *
  751.         UnmarkBlock DropAnchor          * Mark current file to return to
  752.                                         * later
  753.         EditFile "c:!" Return Quit      * Quit temp file if loaded
  754.                                         * Sets EditFile prompt for later
  755.         GotoBlockBeg                    * Return to where we were
  756.         UnmarkBlock                     * Unmark
  757.         DOS 'FGREP -L /'                * Prompt for search text
  758.         Pause                           *
  759.         '/>c:! '                        * Echo output to temp file
  760.         CurrentFilename Return Return   * Search current file
  761.         EditFile Return                 * Load temp file with found text
  762.         Pause                           * Pause to select line to view
  763.         BegLine WordRight MarkWord      * Mark found text line number
  764.         Copy                            * Copy line number to scrap
  765.         KillFile                        * Delete temp file from disk
  766.         PrevFile                        * Return to searched file
  767.         GotoLine Paste Return           * View found text line
  768.         MakeCtrOfScreen                 * Put on screen center
  769. *
  770. * 67 bytes Sat  02-16-1991  02:56:13
  771.  
  772.  
  773.  
  774.  
  775. *---------------------------------------------------------------
  776. * ^(f2_) Find multiple search text in current file, uses Dos FIND
  777. *---------------------------------------------------------------
  778. *
  779. * Find all instances of a given string in current file, let the user
  780. * select one, hit return, and view line containing search string.
  781. * Change "c:" to ramdrive for faster operation.
  782. *
  783. * Uses Dos FIND. Remember search string is case sensitive.
  784. *
  785. ^f2     MacroBegin                      *
  786.         UnmarkBlock DropAnchor          * Mark current file to return to
  787.                                         * later
  788.         EditFile "c:!" Return Quit      * Quit temp file if loaded
  789.                                         * Sets EditFile prompt for later
  790.         GotoBlockBeg                    * Return to where we were
  791.         UnmarkBlock                     * Unmark
  792.         Dos 'FIND /N "'                 * Prompt for search text
  793.         Pause '" '                      *
  794.         CurrentFilename                 * Search current file
  795.         '>c:!' Return Return            * Echo output to temp file
  796.         EditFile Return                 * Load temp file with found text
  797.         Pause                           * Pause to select line to view
  798.         BegLine WordRight MarkWord      * Mark found text line number
  799.         Copy                            * Copy line number to scrap
  800.         KillFile                        * Delete temp file from disk
  801.         PrevFile                        * Return to searched file
  802.         GotoLine Paste Return           * View found text line
  803.         MakeCtrOfScreen                 * Put on screen center
  804. *
  805. * 65 bytes Sat  02-16-1991  02:55:59
  806.  
  807.  
  808.  
  809.  
  810. *-------------------------------------------------------------
  811. * ^(f3_) View another occurence of search text in current file
  812. *-------------------------------------------------------------
  813. * Position cursor on line to view another occurence of search text in
  814. * current file, and hit <enter>. Works after running either ^f1 or ^f2.
  815. *
  816. ^f3 MacroBegin                          *
  817.     onewindow                           * Close all windows
  818.     horizontalwindow zoomwindow         * Open window full, current file
  819.     editfile "c:!" return               * Load temp file with found text
  820.     begline                             * Re-position cursor
  821.     pause                               * Pause to select line to view
  822.     wordright markword copy             * Mark line #, copy to scrap
  823.     zoomwindow                          * Zoom temp file window small
  824.     prevwindow                          * Back to orig file window
  825.     begline                             * Re-position cursor
  826.     gotoline paste return               * Goto found text line
  827. *   pause                               * Pause to see temp file
  828.     zoomwindow                          * Zoom orig window full
  829. *
  830. * 27 bytes Mon  02-18-1991  00:31:32
  831.  
  832.  
  833. * * Alternate version using scratch buffers. Above version is faster,
  834. * * shorter, and runs smoother.
  835. * *
  836. * ^f3 MacroBegin                          *
  837. *     unmarkblock insertline begline      * Insert blank temp line
  838. *     dropanchor currentfilename cut      * Cut currentfilename to scrap
  839. *     editfile "c:!" return               * Load found text temp file
  840. *     begline                             * Re-position cursor
  841. *     pause                               * Pause to select line to view
  842. *     wordright markword                  * Mark line #
  843. *     storescrbuff "1" return             * Store line # to buff 1
  844. *     editfile paste return               * Edit orig file
  845. *     begline                             * Re-position cursor
  846. *     getscrbuff "1" return cut           * Cut line # to scrap
  847. *     gotoline paste return               * Goto found text line
  848. *     makectrofscreen                     * Put on screen center to view
  849. * *
  850. * * 61 bytes Sun  02-17-1991  18:01:50
  851.  
  852.  
  853.  
  854. *┌───────────────────────────────────────────────────────────────────┐
  855. *│@(h) Finds first word on cursor line marked in document below      │
  856. *└───────────────────────────────────────────────────────────────────┘
  857. *
  858. *        @h macro has 2 steps:
  859. *
  860. *        1. Press @ and h at the same time. An ! shows at the
  861. *        end of the top line. Cursor down to desired line in Index.
  862. *
  863. *        2. Press Enter. The macro first erases the !, and
  864. *        then finds the first word on the cursor line in the document
  865. *        below marked with (...).
  866. *
  867. * See BOOK15.QM for more details.
  868. *
  869. @h macrobegin
  870.         unmarkblock                     * Unmark any marked blocks
  871.         begfile endline                 * Go to file begin endline
  872.         "!"                             * Put ! at endline
  873.         begline
  874.         find "!" return return begline  * Highlight !
  875.         pause                           * Pause for Index selection
  876.         wordright markword              * Mark first word on line
  877.         copy                            * Copy word to scrap buffer
  878.         begfile                         * Begfile
  879.         find "!" return return delch    * Find & delete !
  880.         endpara                         * Go to end of Index
  881.         makectrofscreen                 * Cursor line center of window
  882.         find "(" paste ")"
  883.         return "I" return               * Find first marked word in doc
  884.  jfalse NOMARK:
  885.         begline                         * If mark found go to begline
  886.  jump END:
  887.  NOMARK:
  888.         begfile                         * If no mark found go to begfile
  889.  END:
  890. *
  891. * 47 bytes Fri  09-14-1990  14:06:26
  892.  
  893.  
  894.  
  895.  
  896. * =========================================================================
  897. * Date: 10-29-90 (13:26)           Number: 3156         SemWare Support BBS
  898. *   To: EDGAR ESTRADA              Refer#: 3155
  899. * From: TIM FARLEY                   Read: YES
  900. * Subj: Qedit                        Conf: (21) ILink
  901. * ------------------------------------------------------------------------
  902. * EE>I'm interested in finding out how to get Qedit to wordwrap while using
  903. * EE>the right cursor key.
  904. *
  905. * You mean like WordStar does, where it won't let the cursor move
  906. * out into the "empty space" to the right of the lines?
  907. *
  908. * Here are some macros to do this in 2.1:
  909. *
  910. * *
  911. * * Left and Right cursor definitions that wrap to previous/next
  912. * *                line like WordStar does
  913. * *
  914. *-------------------------------------
  915. * (CursorLeft) Macro   (line added TH)
  916. *-------------------------------------
  917. *
  918. cursorleft    MacroBegin     
  919.               CursorLeft     * try to go left
  920.               JTrue end:     * succeed!  then we are done
  921.               CursorUp       * else try to go to prev line
  922.               JFalse end:    * if fail, then at top of file. done.
  923.               EndLine        * jump to end of previous line.
  924.             end:
  925. *
  926. * 13 bytes Mon  10-29-1990  19:33:07 (line added TH)
  927.  
  928.  
  929. *-------------------------------------
  930. * (CursorRight) Macro  (line added TH)
  931. *-------------------------------------
  932. *
  933. cursorright   MacroBegin
  934.               EndLine        * are we at end of line?
  935.               JFalse down:
  936.               PrevPosition   * back to where we were
  937.               CursorRight    * and right one
  938.               Jump end:
  939.             down:
  940.               CursorDown     * try to go to next line
  941.               JFalse end:
  942.               BegLine
  943.             end:
  944. *
  945. * 18 bytes Mon  10-29-1990  19:32:57 (line added TH)
  946.  
  947. * NOTE:  You must have the latest registered release of QEdit 2.1
  948. *        to use these macros.  Otherwise you will experience odd
  949. *        side-effects in the menus and other special contexts where
  950. *        the arrow keys have meaning.
  951. *
  952. * There will be an easier way to achieve this behavior in the next
  953. * release of QEdit.
  954. *
  955. * --Tim Farley
  956. *   SemWare Technical Support
  957.  
  958.  
  959. *------------ (Single line macros for QCONFIG.DAT) ----------------
  960.  
  961. * cursorleft MacroBegin CursorLeft JTrue Label0: CursorUp JFalse Label1: EndLine Label0: Label1:
  962.  
  963. * cursorright MacroBegin EndLine JFalse Label0: PrevPosition CursorRight Jump Label1: Label0: CursorDown JFalse Label2: BegLine Label1: Label2:
  964.  
  965.  
  966.  
  967.  
  968.  
  969.  
  970. * Here are four macros that are variations of wordleft and wordright.
  971. * Macros @a and @f position the cursor on the first word delimiter
  972. * after wordleft and wordright. The cursor position will be the space
  973. * following the word as long as no other word delimiter like "," and
  974. * *"." etc immediately follows the word. Macros @a and @f unmark any
  975. * previously marked block, but I don't know any other way to keep this
  976. * from happening. Macros ^a and ^f do almost what wordleft and
  977. * wordright do except the cursor does not stop at the end of a line.
  978. *
  979. *          @a Moves cursor to first word delimiter after wordleft
  980. *          @f Moves cursor to first word delimiter after wordright
  981. *          ^a Moves cursor to first character of wordleft
  982. *          ^f Moves cursor to first charactetr of wordright
  983.  
  984. *┌──────────────────────────────────────────────────────────────┐
  985. *│@(a) Moves cursor to first word delimiter after wordleft      │
  986. *└──────────────────────────────────────────────────────────────┘
  987. @a  macrobegin                          *
  988.     wordleft wordleft                   * Move wordleft twice
  989.     endline                             * Test if on eol
  990.  jtrue NO_EOL:                          * If not on eol, tests true
  991.     wordleft                            * If on eol, goto wordleft
  992.     jump GOTOPOS:                       * Go to end of word
  993.  NO_EOL: prevposition                   * If not at eol, return
  994.  GOTOPOS:                               * to where we were
  995.     markword gotoblockend unmarkblock   * Get to end of word
  996. *
  997. * 18 bytes Mon  10-22-1990  11:32:21
  998.  
  999. *┌─────────────────────────────────────────────────────────────┐
  1000. *│@(f) Moves cursor to first word delimiter after wordright    │
  1001. *└─────────────────────────────────────────────────────────────┘
  1002. @f  macrobegin                          *
  1003.     wordright                           * Move wordright
  1004.     endline                             * Test if on eol
  1005.  jtrue NO_EOL:                          * If not on eol, tests true
  1006.     wordright                           * If on eol, goto wordright
  1007.     jump GOTOPOS:                       * Go to end of word
  1008.  NO_EOL: prevposition                   * If not at eol, return to
  1009.  GOTOPOS:                               * where we were
  1010.     markword gotoblockend unmarkblock   * Get to end of word
  1011. *
  1012. * 17 bytes Mon  10-22-1990  11:32:32
  1013.  
  1014. *┌─────────────────────────────────────────────────────────────┐
  1015. *│^(a_) Moves cursor to first character of wordleft            │
  1016. *└─────────────────────────────────────────────────────────────┘
  1017. ^a  macrobegin                          *
  1018.     wordleft                            * Move wordleft
  1019.     endline                             * Test if on eol
  1020.  jtrue NO_EOL:                          * If not on eol, tests true
  1021.     wordleft                            * If on eol, goto wordleft
  1022.     jump GOTOPOS:                       * End macro
  1023.  NO_EOL: prevposition                   * If not at eol, return to
  1024.  GOTOPOS:                               * where we were
  1025. *
  1026. * 14 bytes Mon  10-22-1990  11:53:14
  1027.  
  1028. *┌─────────────────────────────────────────────────────────┐
  1029. *│^(f_) Moves cursor to first character of wordright       │
  1030. *└─────────────────────────────────────────────────────────┘
  1031. ^f macrobegin                           *
  1032.     wordright                           * Move wordright
  1033.     endline                             * Test if on eol
  1034.  jtrue NO_EOL:                          * If not on eol, tests true
  1035.     wordright                           * If on eol, goto wordright
  1036.     jump GOTOPOS:                       * End macro
  1037.  NO_EOL: prevposition                   * If not at eol, return to
  1038.  GOTOPOS:                               * where we were
  1039. *
  1040. * 14 bytes Mon  10-22-1990  11:53:03
  1041.  
  1042.  
  1043.  
  1044. * (F4)
  1045. f4      RepeatFind
  1046.  
  1047.  
  1048. * (F5)
  1049. f5      PrevFile
  1050.  
  1051. * (F6)
  1052. f6      NextFile
  1053.  
  1054.  
  1055. * (VERSION) HISTORY:
  1056. *
  1057. *    1.0a - Corrected @5 to use @SRCH-FG.lst, not SRCH.lst.
  1058. *    1.0b - Modified to not use optional batch file.
  1059. *         - Removed @5.
  1060. *    1.0c - Added Alt_0 for search/replace from command line.
  1061. *         - Modified SRC.BAT, @1 & @4 for case sensitive search.
  1062. *         - Modified @4 to re-load search files after replacement.
  1063. *         - Corrected @1 byte size.
  1064. *    1.0d - Removed redundant lines from @0, shortened 31 bytes
  1065. *         - added START-SR.BAT for quick start.
  1066. *         - Changed c:srch.ql to c:$.qm in macros and batch files.
  1067. *           so as to not overwrite qsrch.ql supplied in SRCHxx.ZIP.
  1068. *         - Added killfile c:$.ql to @1 and @4.
  1069. *         - Changed FC0 to fc0 in macros and batch files for better
  1070. *         - visibility.
  1071. *    1.0e - Added @5 for prompted replacement from command line
  1072. *         - Added @6 for prompted replacement while editing
  1073. *         - Added F4/F6 repeatfind/nextfile
  1074. *         - Modified @4 for single search/replacement text input.
  1075. *    1.0f - Modified SR.BAT and SRC.BAT
  1076. *    1.0g - Modified SR.BAT, SRC.BAT and START-SR.BAT.
  1077. *         - Removed INPUT.COM and INPUT.DOC pending author
  1078. *           permission to include.
  1079. *    1.0h - Removed SRC.BAT, Modified all macros and batch files for
  1080. *           NON-case sensitive search
  1081. *         - Added @7 and SRL.BAT to only load files with search text,
  1082. *           no replacement
  1083. *         - Modified SR.BAT to load SRCHxx.MAC on start up.
  1084. *    1.0i - Modified @3 to re-load files after replacement.
  1085. *         - Modified all macros and batch files for NON-case
  1086. *           sensitive search, some had not been changed in v1.0h.
  1087. *         - Corrected some macro byte sizes
  1088. *    1.0j - Modified comments in SR.BAT, SRL.BAT
  1089. *         - Modified @7 to about half the size and twice the speed.
  1090. *         - Included a PCED synonym to search/load files with @7.
  1091. *    1.1  - Corrected @7 macro size
  1092. *         - Removed savefile from old @0
  1093. *         - Modified @0 to load FGREP found text, after replacement.
  1094. *         - Added [copy c:$.ql c:!] to SR.BAT
  1095. *         - Changed FGREP "-f0" to "-f" in SR.BAT, loads found text
  1096. *         - Removed @5, same thing can be done with @1/2 and
  1097. *           manual search/replace.
  1098. *         - Modified srch.ql load filelist for quicker file loading.
  1099. *    1.2  - Changed "c:$.ql" to "c:!" in macros @1/4/6, shortened
  1100. *           each macro 12 bytes.
  1101. *    1.3  - Modified @3 to be smaller and faster.
  1102. *    1.4  - Changed "*F" to #42 "Fi" in @0 and @7 to be able to load
  1103. *           this file and SRL.QM with SR and SRL.
  1104. *         - Modified SRL.BAT to accept SRL [search text] from command
  1105. *           as long as [search text] is a SINGLE word.
  1106. *         - Added altwordset to @0 and @7 to correctly load file names
  1107. *           containing the following characters: !#$%&'(),-./@{}~
  1108. *         - Changed .lst and .ql files.
  1109. *    1.5  - Removed E:\up from SR.BAT & SRL.BAT
  1110. *    1.6  - Added @8 and @9, modified SR.BAT and SRL.BAT.
  1111. *         - @3 was deleting first character in loaded files,
  1112. *           corrected.
  1113. *    1.7  - Added @h to help locate items or macros from Index.
  1114. *         - Added @5.
  1115. *         - Removed @3, same thing is done better by @8.
  1116. *         - Removed @4 and @6, same thing is done better with @5.
  1117. *         - Modified @0 to use the "Once-Around the ring"
  1118. *           technique developed by Kyle Watkins of SemWare.
  1119. *         - Modified SR.BAT and SRL.BAT.
  1120. *    1.8  - Replaced RepeatFind w/ Find "G" in @9.
  1121. *         - Modified SR.BAT and SRL.BAT.
  1122. *    1.9  - Changed Find initialization in @5 and @0.
  1123. *         - Modified START-SR.BAT for no search/replace text.
  1124. *         - Modified @5, @8, @9 and @0 to be shorter and faster.
  1125. *         - Moved SET >c:$ from @0 macro to SR.BAT batch file.
  1126. *    2.0  - Added @a, @f, ^a, ^f variations of wordleft & wordright.
  1127. *         - Changed quick start file from START-SR to START.
  1128. *    2.1  - Added new key definitions for CursorLeft and CursorRight
  1129. *           to wrap cursor to previous/next line like Wordstar does.
  1130. *         - Changed SEARCH file names to SRCH.
  1131. *    2.1a - Corrected Index Use instructions.
  1132. **   2.2  - Modified @7 (SRL.QM) to highlight first occurence of
  1133. *           search text.
  1134. *         - Modified SR.BAT and SRL.BAT to search all files in current
  1135. *           directory if SRCH-FG.LST does NOT exist in directory.
  1136. *         - Changed FGREP search target delimeter from " to / in order
  1137. *           to find strings with " (@1, @5, SR.BAT, SRL.BAT).
  1138. *         - Added F5 - PrevFile.
  1139. *         - Added ^f1 & ^f2 to find multiple search text in current file
  1140. *           using FGREP or Dos FIND. Original macros by Tim Farley.
  1141. *    2.3  - Added ^f3 to view another occurence of search text found
  1142. *           with either ^f1 or ^f2.
  1143. *    2.4  - Added @4 in SRCH_Q.QM to quit each file after replacement
  1144. *           using SRQ.BAT. Quits file after replacement.
  1145.  
  1146. * Tom Hogshead  March 12, 1991
  1147.